#include <iostream>
#include <cmath>
using namespace std;
int main ()
{


int num1, num2, opcion;

cout << "Seleccione una opcion:" << endl;
cout << "1.Suma" << endl;
cout << "2.Resta" << endl;
cout << "3.Multiplicacion" << endl;
cout << "4.Division" << endl;
cout << "5.Salir" << endl;
cin >> opcion;

while (opcion != 5)
{
    if (opcion ==1)
    {
        cout << "Ingrese numero 1" << endl;
        cin >> num1;
        cout << "Ingrese numero 2" << endl;
        cin >> num2;

        cout << num1+num2 << endl;
    }
    else if (opcion ==2)
    {
        cout << "Ingrese numero 1" << endl;
        cin >> num1;
        cout << "Ingrese numero 2" << endl;
        cin >> num2;

        cout << num1-num2 << endl;
    }
    else if (opcion == 3)
    {
        cout << "Ingrese numero 1" << endl;
        cin >> num1;
        cout << "Ingrese numero 2" << endl;
        cin >> num2;

        cout << num1*num2 << endl;
    }

    else if (opcion == 4)
    {
        cout << "Ingrese numero 1" << endl;
        cin >> num1;
        cout << "Ingrese numero 2" << endl;
        cin >> num2;

        if (num2 == 0)
        {
            cout << "Error";
        }
        else
        {
            cout << num1/num2 << endl;
        }
    }
        cout << "Seleccione una opcion:" << endl;
        cout << "1.Suma" << endl;
        cout << "2.Resta" << endl;
        cout << "3.Multiplicacion" << endl;
        cout << "4.Division" << endl;
        cout << "5.Salir" << endl;
        cin >> opcion;

}
}
